Skip to content

WHOOP: read the burn from Bushido, not the Totem bridge - #5

Merged
ehonis merged 1 commit into
mainfrom
sync/private-main
Oct 15, 2026
Merged

ehonis merged 1 commit into
mainfrom
sync/private-main

Conversation

@ehonis

@ehonis ehonis commented Oct 15, 2026

Copy link
Copy Markdown
Owner

Published from the private repository by oss-sync.

  • WHOOP: read the burn from Bushido, not the Totem bridge

19 files changed, 537 insertions(+), 111 deletions(-)

Published from the private repository by oss-sync.

- WHOOP: read the burn from Bushido, not the Totem bridge

 19 files changed, 537 insertions(+), 111 deletions(-)
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-15T00:44:12.405672Z 9bef385 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@ehonis
ehonis merged commit 38af439 into main Oct 15, 2026
2 checks passed

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9bef385490

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread app/src/settings.jsx
Comment on lines +313 to +314
if (d.draft.bushido) await save('bushido')
setResult(doTest ? await test('bushido') : { ok: true, detail: 'Saved.' })

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Refresh WHOOP state after saving Bushido

When Bushido is configured from this screen after the app has loaded, save() refreshes only /api/me; useWhoop() has already fetched the prior { configured: false, burn: {}, error: null } document and never fetches again. The feature flag therefore enables the energy area, but Balance renders nothing and provides no refresh button; even “Save and connect” refreshes only the server cache. The native screen mirrors this behavior, so both clients require a reload before WHOOP appears. Invalidate or refresh the client WHOOP state after saving/testing Bushido.

AGENTS.md reference: AGENTS.md:L404-L407

Useful? React with 👍 / 👎.

Comment thread server/totem.js
async function findHabit(cfg) {
const payload = await call(cfg, 'GET', '/api/habits')
const habits = payload?.habits || payload || []
return habits.find(h => h.id === cfg?.habit || String(h.name || '').toLowerCase() === HABIT_NAME.toLowerCase()) || null

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Verify the configured habit ID in Settings Test

When the owner configures a non-default habit ID while Totem still contains any habit named “Krakatoa,” this fallback returns that differently identified habit. The Settings Test then reports success, although syncDay() posts to cfg.habit and will fail with an unknown habit. Keep the name fallback for migration/creation if needed, but the test must verify that the configured ID is actually present.

AGENTS.md reference: AGENTS.md:L625-L627

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant